test: verify sanitizer build configuration - #1716
Conversation
|
Thanks for opening this — it has been seen, and it is queued. This note is automated, but it is not a brush-off: it exists so you know where your PR stands instead of having to guess from silence. Current review status: working through a backlog. What that means for this PR, concretely:
Things that will genuinely speed it up whenever review does happen:
If this fixes a bug, a reproduction we can run is worth more than a description of the symptom. Thanks for contributing, and sorry in advance for the wait. |
Signed-off-by: astandrik <astandrik@yandex-team.ru>
Signed-off-by: astandrik <astandrik@yandex-team.ru>
4619986 to
ba0c499
Compare
Signed-off-by: astandrik <astandrik@yandex-team.ru>
There was a problem hiding this comment.
Pull request overview
Adds an early “compiled build configuration” probe to the C test-runner binary and enforces it from the test entrypoint scripts, preventing suites from running when a stale/misconfigured runner doesn’t match the intended sanitizer lane.
Changes:
- Add
test-runner --build-config(early-exit) that printssanitized=<0|1> test_seams=<0|1>. - In
scripts/test.sh, assert the freshly-built runner reports the expectedsanitizedvalue before running any suites (iteration / full / TSan paths). - In
scripts/msan.sh, assert the MSan runner reports the expected config before running its suites.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| tests/test_main.c | Adds --build-config output based on compile-time macros (CBM_SANITIZED, CBM_ENABLE_TEST_SEAMS). |
| scripts/test.sh | Adds build-config assertion gate after building runners in each mode. |
| scripts/msan.sh | Adds the same build-config assertion gate for the MSan runner before suites. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Signed-off-by: astandrik <astandrik@yandex-team.ru>
Signed-off-by: astandrik <astandrik@yandex-team.ru>
|
Thank you for this contribution, and sorry that it has had only the automated acknowledgement since August 18. A sanitizer-configuration assertion changes the confidence we place in several test venues, so it needs a deliberate maintainer review even though the diff is test-only. I have now routed it in the maintainer test queue with normal priority. The queue is quite full and review may still take some time, but the PR is no longer unclassified. No changes are requested from you at this triage stage. |
What does this PR do?
Fixes #1648 by checking what each test runner was actually compiled with.
test-runner --build-configexits before suite or test-cache setup and prints one exact line:sanitized=<0|1> test_seams=<0|1>.scripts/test.shchecks that line immediately after building the runner in its iteration, full, and TSan paths.scripts/msan.shperforms the same check before its suites start. If a stale or misconfigured runner disagrees with the lane, the script now stops before any suite can run with the wrong timing budget.The patch only changes
tests/test_main.c,scripts/test.sh, andscripts/msan.sh. It does not touch the Makefile, workflows, dependencies, or production code.Current CI
On head
e3c0010267e783b4270e0ac7c8ee6332b61aeabb, PR CI has finished: 29 checks passed, 2 failed, 1 skipped. DCO, lint, memory analysis, CodeQL, Linux/macOS tests, diagnostic sanitizers, MSan, LSan, all three TSan lanes, Windows guards, the second Windows shard and shard completeness passed.The first Windows CLANG64 shard reported 4,106 passed, 1 failed, 12 skipped. The failure is
version_cohort_crash_releases_process_lifetime_leaseattests/test_version_cohort.c:950,ASSERT(ready); the aggregateci-okconsequently failed. This is not a build-config mismatch.The same named test and assertion also failed in PR #1817's Windows run on 24 August, whose head
87576413does not contain this PR's build-config probe. The failing test, cohort implementation and subprocess implementation are unchanged from the current base. This establishes a prior occurrence outside this patch; it does not establish the underlying Windows failure mechanism. Native Windows ARM64 remains unverified.Original implementation checks
sanitized=0 test_seams=1sanitized=1 test_seams=1SANITIZEpathsscripts/test.shon Linux x86-64bash -n scripts/test.sh scripts/msan.shgit diff HEAD^ HEAD --checkApple Silicon ASan and TSan fail in the sanitizer runtime before
main, so they do not provide evidence about this patch. The remote MSan path is also blocked before its build command because the Compose service is pinned tolinux/arm64and the x86-64 builder has no binfmt/QEMU registration. These are historical local-environment limits; current CI coverage and the remaining Windows failure are recorded above.The original full local lint reached existing diagnostics in unchanged source files; none of the three files in this patch appeared in that output. Current CI lint and memory analysis have passed.
Checklist
git commit -s): CI requires DCO.ci-okremain red as described above.